import java.util.Scanner;

public class Test2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        // 注意 hasNext 和 hasNextLine 的区别
        int[] hash = new int[26];
        int maxCount = 0;
        char ret = ' ';
        while (in.hasNextLine()) {
            String line = in.nextLine();
            for (char c : line.toCharArray()) {
                if (c != ' ') {
                    hash[c - 'a']++;
                    if (hash[c - 'a'] > maxCount) {
                        ret = c;
                        maxCount = hash[c - 'a'];
                    }
                }
            }
        }
        System.out.println(ret);
    }
}
